﻿<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.thymeleaf.org/thymeleaf-extras-shiro">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>用户修改</title>
<link type="text/css" rel="stylesheet" th:href="@{/css/style.css}">
<script type="text/javascript" th:src="@{/js/jquery-1.8.3.min.js}"></script>
</head>
<body>
<div class="main">
	<div class="optitle clearfix">
		<div class="title">用户管理&gt;&gt;</div>

	</div>
	<form id="form1" name="form1" method="post" th:action="@{/user/update}" >
		<input type="hidden" name="method" value="update">
		<div class="content">
			<table class="box"><font color="red"></font>
				<p th:text="${message}" style="color: red"></p>
				<input type="hidden" name="userId"  th:value="${user.userId}" />
			<tr>
					<td class="field">用户编号：</td>
					<td th:text="${user.userId}"> </td>

				</tr>
			<tr>
					<td class="field">用户名：</td>
					<td><input type="text" name="name" class="text" id="name"  th:value="${user.name}"/> <font color="red">*</font><font color="red" id="name_span"></font></td>
				</tr>
				<tr>
					<td class="field">用户性别：</td>
					<td>
						<select name="gender" id="gender">
						    <option value="1"  th:selected="${user.gender}==1" >男</option>
						    <option value="2"  th:selected="${user.gender}==2" >女</option>
						 </select>
					</td>
				</tr>
				<tr>
					<td class="field">出生日期：</td>
					<td><input type="text" name="birthdate" class="text" id="birthDate" th:value="${#dates.format(user.birthdate,'yyyy-MM-dd')}"/> <font color="red">*</font><font color="red" id="birthDate_span"></font></td>
				</tr>
				<tr>
					<td class="field">用户电话：</td>
					<td><input type="text" name="phone" class="text" id="phone" th:value="${user.phone}"/> <font color="red">*</font><font color="red" id="phone_span"></font></td>

				</tr>
				<tr>
					<td class="field">用户地址：</td>
					<td><input name="address" id="address" class="text" th:value="${user.address}"/></td>
				</tr>
				<tr>
					<td class="field">用户权限：</td>

					<td><input type="radio" name="userType"  value="1" th:checked="${user.userType}==1" />管理员<input type="radio" name="userType"  value="2" th:checked="${user.userType}==2" />普通用户
					<input type="radio" name="userType" value="3" th:checked="${user.userType}==3" />经理</td>
				</tr>
			</table>
		</div>
		<div class="buttons">
			<input type="submit" name="update" id="update" value="修改" class="input-button" />
			<input type="button" name="button" id="button" onclick="history.back(-1)" value="返回" class="input-button"/> 
		</div>

	</form>
</div>
</body>
</html>
